Remove the destination file if trying to save a pixbuf failed
authorChristian Dywan <christian@twotoasts.de>
Mon, 25 Jan 2010 09:37:53 +0000 (10:37 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 25 Jan 2010 09:37:53 +0000 (10:37 +0100)
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=591102
gdk-pixbuf/gdk-pixbuf-io.c

index 205ff56866a20803c5e8e07158172e09d5afd2c9..82297252f263f7b102769222ae82f46f97b0af63 100644 (file)
@@ -2057,6 +2057,7 @@ gdk_pixbuf_savev (GdkPixbuf  *pixbuf,
        if (!result) {
                g_return_val_if_fail (error == NULL || *error != NULL, FALSE);
                fclose (f);
+               g_unlink (filename);
                return FALSE;
        }